﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LoadingText : MonoBehaviour {

    public float speed;

    private Vector2 position;

    private float nowTime = 0;

    public int multipleValue=5;

    private void Awake()
    {
        position = transform.position;
    }

    private void FixedUpdate()
    {
        transform.position = Vector2.up * speed * (Mathf.Sin(nowTime / multipleValue * Mathf.PI*2)+0.2f) + position;
        nowTime += Time.deltaTime;
        nowTime %= multipleValue;
    }

}
